//package com.cy.security;
//
//import com.cy.exception.GlobalException;
//import com.cy.restful.ResponseCode;
//import org.springframework.security.core.AuthenticationException;
//import org.springframework.security.web.authentication.AuthenticationFailureHandler;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
///**
// * @author heyunlin
// * @version 1.0
// */
//public class LoginFailHandler implements AuthenticationFailureHandler {
//
//    @Override
//    public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) {
//        throw new GlobalException(ResponseCode.BAD_REQUEST, "登录失败，用户名或密码错误~");
//    }
//
//}